import request from "@/utils/request.js";

// 搜索单词-模糊
export function searchWords(searchInfo) {
	return request({
		url: '/search/searchWords/' + searchInfo,
		method: 'get',
		isLoading: false,
	})
}

// 搜索单词-精确
export function searchWord(searchInfo) {
	return request({
		url: '/search/search/' + searchInfo,
		method: 'get',
		isLoading: false,
	})
}

// 查询搜索历史
export function searchHistory() {
	return request({
		url: '/search/searchHistory',
		method: 'get',
		isLoading: false,
	})
}

// 删除搜索历史
export function deleteHistory(historyIds) {
	return request({
		url: '/search/deleteHistory/' + historyIds,
		method: 'delete',
		isLoading: false,
	})
}